home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / KlingonBGApp.sit / Klingon BG App / Source / SoundUtils.h < prev    next >
Text File  |  1997-06-28  |  1KB  |  58 lines

  1. // Source code for Klingon Clock.   Copyright (C) 1996-1997
  2. // Charles H. Hemstreet IV
  3. //
  4. // Started at MacHack 1996
  5. // Completed at MacHack 1997
  6. //
  7. // Best thanks to:
  8. // My wife Regie, son Chad and baby
  9. // Other thanks to Elden Wood and Bob Clark
  10. //
  11. // This code is distributed "as-is" and implies no warranty or guarantee.
  12.  
  13.  
  14. #ifndef __SOUNDUTILS__
  15. #define __SOUNDUTILS
  16.  
  17.  
  18. #ifndef __SOUND__
  19. #include <Sound.h>
  20. #endif
  21.  
  22. #ifndef __ASSERT__
  23. #include <assert.h>
  24. #endif
  25.  
  26.  
  27. // Constants
  28. #define kSoundDone                913
  29. #define kNumberSounds            13 // this is also defined in main.h!!!
  30. #define kFirstSoundID            1000
  31. #define kOneSecond                60
  32. #define kWaitSeconds             (1 * kOneSecond)
  33.  
  34.  
  35. // prototypes
  36. OSErr             openSndChannel(void);
  37. OSErr            closeSndChannel(void);
  38. OSErr             LoadBufferSounds (void);
  39. Boolean         SndChanDone(SndChannelPtr chan);
  40. void             doPlayASound (short soundID, short priority);
  41. OSErr             playASound (short soundID, short priority);
  42. pascal void     ExternalCallBack (SndChannelPtr, SndCommand);
  43. void             waitCloseChannel(void);
  44.  
  45.  
  46. // GLOBALS
  47. SndCallBackUPP        externalCallBackUPP;
  48. short                externalPriority;
  49.  
  50. // globals declared elsewhere
  51. extern Ptr                    gTheSoundData[kNumberSounds];
  52. extern SndChannelPtr        gSndChannel;
  53. extern Boolean                gChannelOpen;
  54.  
  55.  
  56.  
  57. #endif //__SOUNDUTILS__
  58.